import request from '@/utils/request'
//文章列表
export function article(data) {
    return request({
      url: 'article',
      method: 'get',
      params: data,
      headers: {
        showLoading: true
      }
    })
  }
//文章新增
export function articleCreate(data) {
    return request({
      url: 'article/create',
      method: 'post',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//文章详情
export function articleRead(data) {
    return request({
      url: 'article/read',
      method: 'get',
      params: data,
      headers:{
        'showLoading':true,
        'loadingTarget':'.innerLoding'
      }
    })
  }
//文章编辑
export function articleUpdate(data) {
    return request({
      url: 'article/update',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//文章删除
export function articleDelete(data) {
    return request({
      url: 'article/delete',
      method: 'delete',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//发布
export function articleRestatus(data) {
    return request({
      url: 'article/restatus',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//发布刷新
export function articleRefresh(data) {
    return request({
      url: 'article/refresh',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }






